package newcoder.lx_求int型正整数在内存中存储时1的个数;

import java.util.Scanner;

/**
 * @Author Mr.wang
 * @Description
 * @Date 2020-04-11
 */
public class Main1 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int count = 0;
        while (n > 0) {
            if ((n & 1) > 0) {
                count++;
            }
            n = n >> 1;
        }
        System.out.println(count);
    }
}
